import request from '@/utils/request'
import { api } from './api'
import qs from 'qs'

export function getPerformanceConfigInfo (parameter) {
  return request({
    url: api.getPerformanceConfigInfo,
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: qs.stringify(parameter)
  })
}

export function savePerformanceConfigInfo (parameter) {
  return request({
    url: api.savePerformanceConfigInfo,
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: qs.stringify(parameter)
  })
}

export function updatePerformanceConfigInfo (parameter) {
  return request({
    url: api.updatePerformanceConfigInfo,
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: qs.stringify(parameter)
    // method: 'post',
    // data: parameter
  })
}

export function simulationPerformance (parameter) {
  return request({
    url: api.simulationPerformance,
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: qs.stringify(parameter)
  })
}

export function getYearsVersion (parameter) {
  return request({
    url: api.getYearsVersion,
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: qs.stringify(parameter)
  })
}
export function updateRemoval (parameter) {
  return request({
    url: api.updateRemoval,
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: qs.stringify(parameter)
  })
}

export function copyPerformance (parameter) {
  return request({
    url: api.copyPerformance,
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: qs.stringify(parameter)
  })
}
